import {NgModule} from '@angular/core';
import {RouterModule, Routes} from "@angular/router";
import {SetPasswordComponent} from "@auth/set-password/set-password.component";
import {RegisterComponent} from "@auth/register/register.component";
import {SetNicknameComponent} from "@auth/set-nickname/set-nickname.component";
import {RegistrationProtocolComponent} from "@protocol/registration-protocol/registration-protocol.component";
import {AuthComponent} from "@auth/auth.component";
import {LoginComponent} from "@auth/login/login.component";


const routes: Routes = [
  {
    path: '',
    component: AuthComponent,
    children: [
      {
        path: '',
        redirectTo: 'login',
        pathMatch: 'full'
      },
      {
        path: 'login',
        component: LoginComponent
      },
      {
        path: 'set-psw',
        component: SetPasswordComponent
      },
      {
        path: 'register',
        component: RegisterComponent
      },
      {
        path: 'set-nickname',
        component: SetNicknameComponent
      },
      {
        path: 'registration-protocol',
        component: RegistrationProtocolComponent
      },
    ]
  },
];

@NgModule({
  imports: [
    RouterModule.forChild(routes)
  ],
  exports: [RouterModule]
})
export class AuthRoutingModule {
}
